package com.xl.studentpass.component;

import cn.dev33.satoken.stp.StpInterface;
import com.xl.studentpass.service.GetPermissionService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author: xl
 * @createTime: 2023/5/24 15:25:37
 * @program: student-pass
 * @e-mail: 2199396150@qq.com
 * @description:
 */
@Component
public class StpPermissionConfig implements StpInterface {

    @Resource
    GetPermissionService getPermissionService;

    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        return getPermissionService.getPermissionList((Integer) loginId);
    }

    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        return getPermissionService.getRoleList((Integer) loginId);
    }
}
